<html>
<body>
<style>
.page {
  direction: ltr;
  width: 816px;
  height: 1056px;
  margin: 1px auto -8px auto;
  position: relative;
  overflow: visible;
  border: 9px solid transparent;
  background-clip: content-box;
  border-image: url(images/shadow.png) 9 9 repeat;
  background-color: white;
}
.canvasWrapper {
  overflow: hidden;
}

.textLayer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  color: #000;
  font-family: sans-serif;
  overflow: hidden;
}

.textLayer > div {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
}

.textLayer .highlight {
  margin: -1px;
  padding: 1px;

  background-color: rgba(180, 0, 170, 0.2);
  border-radius: 4px;
}

.textLayer .highlight.begin {
  border-radius: 4px 0px 0px 4px;
}

.textLayer .highlight.end {
  border-radius: 0px 4px 4px 0px;
}

.textLayer .highlight.middle {
  border-radius: 0px;
}

.textLayer .highlight.selected {
  background-color: rgba(0, 100, 0, 0.2);
}

</style>

<div id="pageContainer5" class="page" style="width: 1019px; height: 1319px;" data-loaded="true">
<div class="canvasWrapper" style="width: 1019px; height: 1319px;">
<canvas id="page5" width="1019" height="1319" style="width: 1019px; height: 1319px;">
</canvas>
</div>
<div class="textLayer" style="width: 1019px; height: 1319px;">
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="311.88128000000006" style="position: absolute; left: 89.99999999999999px; top: 123.15146799999978px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9450947878787881, 1); -webkit-transform-origin: 0% 0%;">resentations are assigned an integer key called the</div>
<div data-font-name="g_font_10" data-angle="0" data-canvas-width="77.140928" style="position: absolute; left: 407.633px; top: 123.30090799999978px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9294087710843374, 1); -webkit-transform-origin: 0% 0%;">object shape</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="3.7359999999999998" style="position: absolute; left: 484.76966666666664px; top: 123.15146799999978px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9339999999999999, 1); -webkit-transform-origin: 0% 0%;">.</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="373.958656" style="position: absolute; left: 90.00000000000004px; top: 139.7559679999999px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9143243422982885, 1); -webkit-transform-origin: 0% 0%;">Thus, the guard is a simple equality check on the object shape.</div>
<div data-font-name="g_font_1" data-angle="0" data-canvas-width="261.878656" style="position: absolute; left: 109.92533333333338px; top: 156.18097333333313px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(1.0033664980842911, 1); -webkit-transform-origin: 0% 0%;">Representation specialization: numbers.</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="109.957952" style="position: absolute; left: 378.55133333333333px; top: 156.36030133333313px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9318470508474577, 1); -webkit-transform-origin: 0% 0%;">JavaScript has no</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.511648" style="position: absolute; left: 90.00000000000004px; top: 172.96463466666634px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9913225074626865, 1); -webkit-transform-origin: 0% 0%;">integer type, only a Number type that is the set of 64-bit IEEE-</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.5116479999999" style="position: absolute; left: 90.00000000000004px; top: 189.56913466666649px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9839793777777776, 1); -webkit-transform-origin: 0% 0%;">754 floating-pointer numbers (“doubles”). But many JavaScript</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.51164799999987" style="position: absolute; left: 90.00000000000004px; top: 206.1734679999997px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9119259679633864, 1); -webkit-transform-origin: 0% 0%;">operators, in particular array accesses and bitwise operators, really</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.511648" style="position: absolute; left: 90.00000000000004px; top: 222.77796799999985px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9311019813084112, 1); -webkit-transform-origin: 0% 0%;">operate on integers, so they first convert the number to an integer,</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="328.155296" style="position: absolute; left: 90.00000000000004px; top: 239.9861346666664px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9651626352941177, 1); -webkit-transform-origin: 0% 0%;">and then convert any integer result back to a double.</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="4.981333333333333" style="position: absolute; left: 418.15999999999997px; top: 237.01514533333307px; font-size: 9.962666666666665px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.8302222222222221, 1); -webkit-transform-origin: 0% 0%;">1</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="58.969024000000005" style="position: absolute; left: 429.5414999999999px; top: 239.9861346666664px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9511132903225807, 1); -webkit-transform-origin: 0% 0%;">Clearly, a</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.51164800000004" style="position: absolute; left: 89.99999999999999px; top: 256.59046799999965px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9311019813084113, 1); -webkit-transform-origin: 0% 0%;">JavaScript VM that wants to be fast must find a way to operate on</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="270.62089599999996" style="position: absolute; left: 89.99999999999999px; top: 273.1949679999998px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9081238120805368, 1); -webkit-transform-origin: 0% 0%;">integers directly and avoid these conversions.</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="378.576352" style="position: absolute; left: 109.92533333333333px; top: 289.799301333333px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9324540689655172, 1); -webkit-transform-origin: 0% 0%;">In TraceMonkey, we support two representations for numbers:</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.51164799999987" style="position: absolute; left: 90px; top: 306.40380133333304px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9332825480093674, 1); -webkit-transform-origin: 0% 0%;">integers and doubles. The interpreter uses integer representations</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.51164799999987" style="position: absolute; left: 90px; top: 323.00813466666636px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.8995748261851013, 1); -webkit-transform-origin: 0% 0%;">as much as it can, switching for results that can only be represented</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.51164799999987" style="position: absolute; left: 90px; top: 339.6124679999996px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9140175412844034, 1); -webkit-transform-origin: 0% 0%;">as doubles. When a trace is started, some values may be imported</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.511648" style="position: absolute; left: 90px; top: 356.2169679999996px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.935473352112676, 1); -webkit-transform-origin: 0% 0%;">and represented as integers. Some operations on integers require</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.5116480000001" style="position: absolute; left: 90px; top: 372.82130133333294px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9289315804195807, 1); -webkit-transform-origin: 0% 0%;">guards. For example, adding two integers can produce a value too</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="209.903424" style="position: absolute; left: 90px; top: 389.42580133333297px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9287762123893806, 1); -webkit-transform-origin: 0% 0%;">large for the integer representation.</div>
<div data-font-name="g_font_1" data-angle="0" data-canvas-width="115.96544" style="position: absolute; left: 109.92533333333333px; top: 405.8508066666662px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(1.073754074074074, 1); -webkit-transform-origin: 0% 0%;">Function inlining.</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="256.46892799999995" style="position: absolute; left: 232.03416666666666px; top: 406.0301346666662px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9569736119402983, 1); -webkit-transform-origin: 0% 0%;">LIR traces can cross function boundaries</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.511648" style="position: absolute; left: 90.00000000000001px; top: 422.6344679999995px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9791440982800982, 1); -webkit-transform-origin: 0% 0%;">in either direction, achieving function inlining. Move instructions</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.51164800000015" style="position: absolute; left: 90.00000000000001px; top: 439.23896799999955px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9398859622641513, 1); -webkit-transform-origin: 0% 0%;">need to be recorded for function entry and exit to copy arguments</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.5116479999999" style="position: absolute; left: 90.00000000000001px; top: 455.84330133333276px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.8995748261851014, 1); -webkit-transform-origin: 0% 0%;">in and return values out. These move statements are then optimized</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.51164799999987" style="position: absolute; left: 90.00000000000001px; top: 472.4478013333328px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9511017852028636, 1); -webkit-transform-origin: 0% 0%;">away by the compiler using copy propagation. In order to be able</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.51164800000004" style="position: absolute; left: 90.00000000000001px; top: 489.0521346666661px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9937946334164589, 1); -webkit-transform-origin: 0% 0%;">to return to the interpreter, the trace must also generate LIR to</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.51164799999987" style="position: absolute; left: 90.00000000000001px; top: 505.65646799999945px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9649192445520578, 1); -webkit-transform-origin: 0% 0%;">record that a call frame has been entered and exited. The frame</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.5116479999999" style="position: absolute; left: 90.00000000000001px; top: 522.2609679999995px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(1.019211375959079, 1); -webkit-transform-origin: 0% 0%;">entry and exit LIR saves just enough information to allow the</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.5116479999999" style="position: absolute; left: 90.00000000000001px; top: 538.8653013333328px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9465834869358668, 1); -webkit-transform-origin: 0% 0%;">intepreter call stack to be restored later and is much simpler than</div>
<div data-font-name="g_font_2" data-angle="0" data-canvas-width="398.5116480000001" style="position: absolute; left: 90.00000000000001px; top: 555.4698013333327px; font-size: 14.943999999999999px; font-family: sans-serif; -webkit-transform: rotate(0deg) scale(0.9696147153284674, 1); -webkit-transform-origin: 0% 0%;">the interpreter’s standard call code. If the function being entered</div>
</div>
</body>
</html>